<?php
require('config.php');
		$sql="select fieldCode,fieldValue from `".$oto."_sys_configs` where fieldCode in ('mallName','mallDesc','mallLogo','phoneNo','iPhone','Android')";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$sys[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(isset($sys))
		{
			for($i=0;$i<count($sys);$i++)
			{
				if($sys[$i]['fieldCode']=='mallName') $data[0]['mallName']=$sys[$i]['fieldValue'];
				if($sys[$i]['fieldCode']=='mallDesc') $data[0]['mallDesc']=$sys[$i]['fieldValue'];
				if($sys[$i]['fieldCode']=='mallLogo') $data[0]['mallLogo']=$sys[$i]['fieldValue'];
				if($sys[$i]['fieldCode']=='phoneNo') $data[0]['phoneNo']=$sys[$i]['fieldValue'];
				if($sys[$i]['fieldCode']=='iPhone') $data[0]['iPhone']=$sys[$i]['fieldValue'];
				if($sys[$i]['fieldCode']=='Android') $data[0]['Android']=$sys[$i]['fieldValue'];
			}
			echo json_encode($data);
		}
		else echo '[]';
		
?>